"""
Bazel Module for X-Plane Plugins SDK

This Bazel module provides a straightforward and easy-to-use interface for creating an X-Plane Plugins and linking it to the required SDKs and libraries.

Features:
- Download and linking of the X-Plane Plugins SDK to your target.
- Seamless integration with Bazel's build system.
- Support for common platforms used by X-Plane (Windows, macOS, Linux).

Usage:
To use this module, add this module as a dependency in your Bazel Module file and include it using "@xplane_sdk" in the deps section of your target in your BUILD file. This will give you access to all the XPlane SDK headers such as "XPLMProcessing.h" "XPLMDataAccess.h" "XPLMUtilities.h" etc. It will also link the final binary to the X-Plane SDKs. Make sure your target is a cc_binary and has the "linkstatic" and "linkshared" attributes set to True. This will ensure your plugin gets built as a dll, which you can rename to .xpl and place in the XPlane plugins folder. Make sure your plugin code has all the exported functions required [for example: PLUGIN_API int XPluginStart(char *outName, char *outSig, char *outDesc){}] as per the docs, see links below.

https://developer.x-plane.com/article/developing-plugins/
https://developer.x-plane.com/code-sample/timedprocessing/ (Get started with this example code!)
https://developer.x-plane.com/sdk/plugin-sdk-documents/
https://developer.x-plane.com/article/building-and-installing-plugins/ (This module manages the linking for you, so don't worry too much about section 2 & 3 in that documentation. Note that OpenGL is not linked as part of this and is not required by the SDKs, even though it's mentioned in the documentation. If you need OpenGL or other graphics libraries, you will need to get those dependencies separately.)

Please Note:
This module is community-supported and is not officially affiliated with Laminar Research or the X-Plane development team. Please refer to the X-Plane Plugins SDK documentation for detailed information on plugin development.

"""

module(
    name = "xplane_sdk",
    version = "4.1.1",
    compatibility_level = 1,
)

bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "rules_cc", version = "0.1.1")
